package run.leven.notice.starter.mq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.RabbitTemplate;

/**
 * @author leven
 * @date 2020/3/16 23:33
 */
@Slf4j
public class ReturnCallbackListener implements RabbitTemplate.ReturnCallback {
    @Override
    public void returnedMessage(Message message, int replyCode, String replyText, String exchange, String routingKey) {
        log.debug("return--message:" + new String(message.getBody()) + ",replyCode:" + replyCode +
                ",replyText:" + replyText + ",exchange:" + exchange + ",routingKey:" + routingKey);
    }
}
